#pragma once
#include "stdafx.h"


class PSysFromScript
{
public:


	
	PSysFromScript(Ogre::Vector3 position, Ogre::SceneManager* sm, Ogre::String scriptname)
	{
		static int id = 0;

		Ogre::SceneNode* sysNode = sm->getRootSceneNode()->createChildSceneNode();
		Ogre::ParticleSystem* psys = sm->createParticleSystem("psys"+Ogre::StringConverter::toString(id), scriptname);
		sysNode->attachObject(psys);
		sysNode->setPosition(position);

		id++;
	}

	PSysFromScript(Ogre::SceneNode *node, Ogre::SceneManager* sm, Ogre::String scriptname)
	{
		static int id = 0;

		Ogre::ParticleSystem* psys = sm->createParticleSystem("psysAttachedToNode"+Ogre::StringConverter::toString(id), scriptname);
		node->attachObject(psys);

		id++;
	}

};
